﻿<Application x:Class="LinesOfAction.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Converters="clr-namespace:LinesOfAction.Converters"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <Style TargetType="{x:Type Rectangle}">
            <Setter Property="Stroke" Value="Black" />
            <Setter Property="Width"
                    Value="{Binding Path=Width, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Converter={Converters:MultiplierConverter Fator=0.125}}" />
            <Setter Property="Height"
                    Value="{Binding Path=Height, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Converter={Converters:MultiplierConverter Fator=0.125}}" />
            <Setter Property="Fill">
                <Setter.Value>
                    <MultiBinding Converter="{Converters:PositionToColorConverter}">
                        <Binding Path="(Grid.Row)" RelativeSource="{RelativeSource Mode=Self}" />
                        <Binding Path="(Grid.Column)" RelativeSource="{RelativeSource Mode=Self}" />
                    </MultiBinding>
                </Setter.Value>
            </Setter>
        </Style>
    </Application.Resources>
</Application>